From: Timm Bäder Date: Wed, 11 Oct 2017 06:06:33 +0000 (+0200) Subject: eventcontrollerscroll: Emit ::scroll for -1/+1 discrete steps X-Git-Tag: archive/raspbian/3.24.39-1+rpi1~1^2~65^2~34^2~4^2~12 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=7b8c036f8fd1c351d6816250283d9651f625c4ef;p=gtk%2B3.0.git eventcontrollerscroll: Emit ::scroll for -1/+1 discrete steps The > 1 meant it only emits the signal for -2/+2 steps. --- diff --git a/gtk/gtkeventcontrollerscroll.c b/gtk/gtkeventcontrollerscroll.c index 61f916782c..57991db1ae 100644 --- a/gtk/gtkeventcontrollerscroll.c +++ b/gtk/gtkeventcontrollerscroll.c @@ -239,14 +239,14 @@ gtk_event_controller_scroll_handle_event (GtkEventController *controller, scroll->cur_dy += dy; dx = dy = 0; - if (ABS (scroll->cur_dx) > 1) + if (ABS (scroll->cur_dx) >= 1) { steps = trunc (scroll->cur_dx); scroll->cur_dx -= steps; dx = steps; } - if (ABS (scroll->cur_dy) > 1) + if (ABS (scroll->cur_dy) >= 1) { steps = trunc (scroll->cur_dy); scroll->cur_dy -= steps;